home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / The Director v1.2.adf / Scripts / Telemetry < prev    next >
Text File  |  1988-05-08  |  3KB  |  153 lines

  1. rem     *** example of ShowANIM playing from the Director ***
  2.  
  3. rem     first do the anim setup
  4.  
  5.    memory all,chip,fast
  6.    if all<600000:sm=0:else:sm=1:endif
  7.    execute a,"assign mod: The_Director:options"
  8.    module "sound"
  9.    pause 3
  10.    print
  11.    print "This is an example of a Director script that"
  12.    print "combines an IFF ANIM animation file (which was"
  13.    print "created by VideoScape-3D), with partial screen"
  14.    print "page-flipping, color cycling, and sound.  ";
  15.     sound perioda,"load",1,"The_Director:sounds/telemetry.snd"
  16.    pause 20
  17.    setblack 1
  18.    wavepos=0
  19.    waveform=510
  20.    load 1,"The_Director:pictures/telscreen"
  21.    load 3,"The_Director:pictures/telcells"
  22.  
  23.    loadanim 21,"The_Director:anims/tel.anim"
  24.    if sm
  25.       sound periodb,"load",2,"The_Director:sounds/phart.snd"
  26.    endif
  27.    sound periodc,"load",3,"The_Director:sounds/comms.snd"
  28.  
  29.    sound a,"play",1,0,63
  30.    sound a,"play",1,0,63
  31.  
  32.    abort 0
  33.  
  34. rem  initialize stuff:
  35.    position -1,-1
  36.    new 2,1
  37.    array 100,1
  38.    copy 1,2
  39.    display 2
  40.    speed 1
  41.    buff = 1
  42.    intlv = 0
  43.    n = 2
  44.    flag=0
  45.    p=1
  46.  
  47.    setblack 0
  48.    cycle 1
  49.    fixpalette 1
  50.    blitdest buff
  51.  
  52. rem  get the pageflip started:
  53.    gosub 710
  54.    gosub 710
  55.  
  56.    gosub 610:rem  init the other window
  57.  
  58. rem  main loop
  59. rem  check for mouse click explicitly so we can fade the
  60. rem  sound out when abort is signalled.
  61.  
  62. 101   for l=0 to 60+?200
  63.    ifmouse xm,ym
  64.    if xm#-1:goto 102:endif
  65.    gosub 320+390*?2
  66.    next
  67.    gosub 410
  68.    gosub 610
  69.    goto 101
  70.  
  71. rem mouse abort detected, wait for sound fadeout
  72. 102 sound a,"slowfade",10
  73.    gosub 320
  74.     for l=0 to 220
  75.     gosub 320+390*?2
  76.     next
  77.     fade 0,-1,2
  78.     end
  79.  
  80. rem     do next frame in the anim:
  81. rem     set p=1 first if normal delay,
  82. rem     set p=0 first if you want to bypass delay
  83. rem     to make up time for other stuff being done in between frames
  84.  
  85. 310  pause 1
  86. 320  if intlv
  87.       skipanim 21,buff,abs,rel,intlv
  88.    endif
  89.    anim 21,buff,abs,rel,intlv
  90.    display buff
  91.    buff=3-buff
  92.    blitdest buff
  93.    goto waveform
  94.  
  95. rem intermittent sound routine
  96.  
  97. 410   snd=2+?2
  98.    if snd=2:period=500+?1000
  99.    else
  100.     z=?400
  101.       period=periodc+z-200
  102.    wavepos=0
  103.    wavec=50+z/10
  104.    waveform=520
  105.    endif
  106.    sound a,"play",snd,1,47,period
  107.    sound a,"play",snd,1,47,period
  108.    return
  109.  
  110. rem waveform 1 routine
  111. 510 blit 3,wavepos,0,98,27,94,19
  112.    z=0~(wavepos-94)
  113.    zz=98+94-z
  114.    blit 3,0,0,zz,27,z,19
  115.    wavepos=(wavepos+4)%188
  116.    return
  117.  
  118. rem waveform 2 routine
  119. 520 blit 3,wavepos,0,98,27,94,19
  120.    rem wavepos=94-wavepos
  121.    wavepos=?94
  122.    wavec=wavec-1
  123.    if 0=wavec:waveform=510:endif
  124.    return
  125.  
  126. rem  com-vid screen
  127.  
  128. 610 t=31+63*?3
  129.    blit 3,0,t,25,123,95,63
  130.    gosub 320
  131.    blit 3,0,t,25,123,95,63
  132.    t=46*?5
  133.    x=33+33*?2
  134.    gosub 320
  135.    y=131+31*?2
  136.    transparent 1
  137.    blit 3,t,19,x,y,45,12
  138.    transparent 0
  139.    gosub 320
  140.    transparent 1
  141.    blit 3,t,19,x,y,45,12
  142.    transparent 0
  143.    return
  144.  
  145. rem  page flip
  146.  
  147. 710    X=96+?161:Y=31+?126
  148.    blit 3,X,Y,215,123,95,63
  149.    gosub 320
  150.    blit 3,X,Y,215,123,95,63
  151.    return
  152.  
  153.